Method to accelerate the processing of multiperiod optimal power flow problems

ABSTRACT

A method is disclosed for optimizing the power flow in an electric power network including a plurality of buses interconnected by transmission lines, and locally connected to loads, generators, and storage devices, the method executing an interior point optimisation algorithm in a computer system to solve an optimal control problem, which is defined over a time period of interest T, and is associated with an objective function representing the total fuel consumption of the generators for the time period of interest T, wherein the objective function depends on a plurality of parameters of the network, such as bus voltages, generator, and storage device powers. the parameters of the network allowed to vary over a large number N of predefined time intervals, each of duration δt, obtained by subdivisions of the time period of interest T and is subject to network constraints. The time and memory required to achieve the solution to the optimal control problem is drastically reduced over general purpose NLP methods, due to exploitation in the calculations involved in the Schur complement algorithm of the repetition of constant in time block matrices of charging and discharging ratios of the storage devices inside off diagonal blocks in a reorder KKT system.

FIELD OF APPLICATION

The present invention relates generally to electric power networks. More specifically, it concerns the power flow optimization of electric power networks that involve energy storage devices.

PRIOR ART

A method for optimizing electric power flows in a power network, more particularly in a power grid having alternating current (AC) circuits, is addressed to determine bus voltages and generator power levels in order to minimise power generation costs or other costs (market related) or transmission losses. The minimization of the costs is subject to power flow engineering and operational constraints that can include the AC power flow constraints, bounds on power generation, bounds on bus voltage magnitudes, bounds on thermal losses, and limits on power transfer on transmission lines. Bus voltages and generator power levels are determined as a solution of an Optimal Power Flow (OPF) problem. In this respect, several methods known to solve the OPF problem are briefly commented on below.

Conventional power flow optimization methods assume small differences between phase angles at buses, to reduce quadratic equalities and inequalities to linear equalities and inequalities. However, these methods cannot be applied to all networks and they lead to suboptimal solutions.

Other methods such as second-order cone programming (SOCP) employ convex relaxations of OPF problems. However, relaxed convex optimizations methods cannot guarantee feasible solutions.

Further known methods relax OPF problems to semidefinite programming (SDP), which requires changing resistances of lossless lines in the network, restrictions on the network topology or constraints, or require modification of the network to ensure global optimality.

These methods are affected by the following drawbacks. They do not consider that the amount of energy that is stored, charged, or discharged in batteries at any time is critically dependent on the amount that is actually charged or discharged from the batteries at that time.

They ignore time dependent changes for equipment, and use devices such as step voltage regulators, voltage transformers, or capacitor banks. These devices are typically expensive and frequent changes in their operations can lead to quick degradation of the equipment and eventually result in dramatic reduction in the life of the device.

Modern real-time operations require the AC-OPF problem to be solved weekly in 8 hours, daily in 2 hours, hourly in 15 minutes, each five minutes in 1 minute and for self-healing post-contingency in 30 seconds (Mary B Cain, Richard P O′neill, and Anya Castillo. History of optimal power flow and formulations. Federal Energy Regulatory Commission, pages 1-36, 2012). To meet these constraints, system operators have to adopt varying levels of approximations such as, simplified OPF tools based on linear programming (LP) and de-coupled (DC) system models. As a result today's approximate solution techniques may unnecessarily cost tens of billions of dollars per year, and result to environmental harm from unnecessary emissions and wasted energy.

General nonlinear programming (NLP) methods have also been employed for the solution of OPF problems. These methods are adapted to properly optimise the electric power flow taking into account all the nonlinearities, and a plurality of time periods necessitated by time-varying parameters of power network equipment. These methods do not adopt any approximations or simplifications that would result in unnecessarily higher cost of energy, wasted energy and environmental harm.

Despite their robustness however, NLP methods have not been widely adopted in real-time operations of large-scale power systems. This is due to the fact that the multiperiod optimal power flow (MPOPF) problem a system operator seeks a solution to, is time-coupled due to power network equipment such as energy storage devices, an example of which are batteries. Its complexity increases quickly with an increasing number of the time periods, over which power network equipment parameters are set to vary with time, to the point of intractability. As a result NLP methods require high computational times and large amounts of computer memory in order to solve the MPOPF problem. In other words, the NLP methods currently known are not suitable for real-time operations and cannot be adopted by the industry for controlling the power network. Historically, this is mainly due to the lack of time and memory efficient AC-OPF algorithms.

SUMMARY OF THE INVENTION

The idea at the base of the present invention is to provide a method that can take advantage of the particular structure and properties of the MPOPF problem, in order to reduce the solution time and memory consumption to the minimum even for very large values of the number of time periods of operation of the power grid.

The disclosed invention describes a system and a method for operating an electric power system that determines optimal bus voltages and phases angles as well as optimal generator active and reactive powers, such that an objective function representing the cost of power generation or other cpsts (market related), or transmission losses is either minimised or maximised. This is achieved by an interior point structure-exploiting optimization method that is tailored to deliver unprecedented performance and reduce the memory consumption to minimum.

The present invention accomplishes the foregoing objectives by providing a structure-exploiting optimization method that provides the capability of optimal power flow over multiple time periods of operation to complex power systems. A power system or network in this sense refers to an electrical power system or an electrical network that includes energy storage devices.

More specifically, power flow in an electric power network is optimised during multiple time periods of operation by solving an optimal control problem using an interior point method designed to exploit the structure and the properties of the optimal control problem for an electrical power system with energy storage devices, in order to deliver significant reduction of the computing time and the memory consumption.

More specifically, the embodiments of the invention provide a sparse structure-exploiting KKT system Schur factorization and solution method that is adapted to the modeling of the power system components.

Additionally, a structure exploiting low memory Schur complement dense LDL^(T) solver is also provided that achieves optimal time and memory factorization and solution of the dense Schur complement system, required by the structure-exploiting sparse KKT factorization and solution methods.

To accommodate very large problems arising for a sufficiently large number of time periods of operation, the invention also provides an alternative structure-exploiting algorithm that keeps the memory requirements approximately comparable to the memory consumption if a single time period of operation is assumed. This way both objectives of computational time and memory reduction are achieved.

On the basis of the idea mentioned above, the technical problem is solved by a method for optimizing the power flow in an electric power network, the electric power network including a plurality of buses interconnected by transmission lines, and locally connected to loads, generators and storage devices;

the method executes an interior point optimization algorithm in a computer system to solve an optimal control problem defined over a time period of interest T, where an objective function associated with the optimal control problem represents a total fuel consumption of the generators for said time period of interest T, the objective function depending on a plurality of parameters of the network, bus voltages, generator, and storage devices powers, the parameters of the network allowed to vary over a number N of predefined time intervals each of duration δt obtained by subdivisions of said time period of interest T, wherein said objective function is subject to engineering constraints imposed by the safe and robust functionality of the devices of said network, such as limits on bus voltages, limits on generator and storage devices powers, and thermal power flow limits on the transmission lines, characterized by the fact that said interior point optimization algorithm includes the steps of:

storing a KKT system associated with the optimality conditions for the Lagrangian associated with the objective function and the constraints defined for the time period T, the KKT system including a Hessian matrix H;

reordering the KKT system to obtain a reordered KKT system where the Hessian matrix H after the reordering has an arrowhead structure with diagonal blocks A_(n), and off diagonal blocks B_(n) comprising several identical copies of constant in time matrix B of charging and discharging ratios of the storages devices;

executing a direct Schur complement based factorization and solution algorithm on the reordered KKT system;

returning output parameters for the network devices, namely, buses, loads, generators, and storages devices as a solution of the optimal control problem for each of the time intervals.

Advantageously, the time and memory required to achieve the solution to the optimal control problem are drastically reduced over general purpose NLP methods, due to exploitation, in the calculations involved in the Schur complement algorithm, of the repetition of constant in time block matrices B of charging and discharging ratios of the storage devices inside the off diagonal blocks B_(n) in the reorder KKT system.

In the following description, the expressions “time interval” and “time periods” are used as synonyms.

The dependent claims disclose further features of the method and system according to the present invention, and the effects and advantages thereof are given here below, together with a detailed explanation of how the method is embodied.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the invention, reference is made to the following description and accompanying drawings, in which:

FIG. 1 is a schematic of the power network of the benchmark case IEEE30 used by the embodiments of the present invention;

FIG. 2 is a schematic of the power network of the benchmark case IEEE118 used by the embodiments of the present invention;

FIG. 3 is a schematic of the power network of the benchmark case PEGASE1354 used by the embodiments of the present invention;

FIG. 4 is a schematic of the power network of the benchmark case PEGASE13659 used by the embodiments of the present invention;

FIG. 5 is a diagram representing a network demand for a 24 hour period;

FIG. 6 is two diagrams representing the number of iterations until convergence of the method of present invention (MPFOPT) together with other popular NLP based OPF methods, wherein the control parameters vary over N=2880 predefined time intervals (top) and N=1200 time intervals (bottom). In both cases after the 5th iteration, the diagrams partially overlap (and are not precisely distinguishable) due to the fact that all methods converge to the same objective;

FIG. 7 is a plot representing the sparse structure of the Hessian matrix of the KKT system for the power grid described by the case IEEE30 according to the method of the prior art, wherein the control parameters vary over N=5 predefined time intervals of the time period T of interest;

FIG. 8 is a plot representing the sparse structure of the Hessian matrix associated with the reordered KKT system derived from the KKT system of FIG. 7, according to a method step of the present invention;

FIG. 9 is a plot representing the sparse structure of the auxiliary matrix P_(n) for n=1, associated with the reordered KKT system of FIG. 8;

FIG. 10 is a plot representing the sparse structure of the auxiliary matrix P_(n) for n=1, associated with a reordered KKT system similar to that of FIG. 8, wherein the number of predefined time intervals is set to N=240;

FIG. 11 is a diagram comparing the time to find the optimal power flow of the network according to the method of the present invention (MPFOPT) to the time to find the optimal solution according to three different prior art methods (MIPS, IPOPT, KNITRO), for different values N of predefined time intervals;

FIG. 12 is a diagram comparing the average time per iteration to find the optimal solution according to two embodiments of the present invention (MPFOPT, MPFOPTmem) to the average time per iteration to find the optimal solution according to two different prior art methods (MIPS, IPOPT), for N=3600 up to N=8760 predefined time intervals;

FIG. 13 is a diagram representing the time of different steps of the method of the present invention, for different values of N; and

FIG. 14 is another diagram comparing the average time per iteration to find the optimal solution according to two embodiments of the present invention (MPFOPT, MPFOPTmem) to the average time per iteration to find the optimal solution according to three different prior art methods (MIPS, IPOPT, KNITRO), for the solution of the benchmark cases listed in Table 3.

DETAILED DESCRIPTION The Network

Hereafter a method for optimizing the power flow in an electric power network according to the present invention is described in more detail.

The electric power network includes a plurality of buses interconnected by transmission lines, and locally connected to loads, generators, and storage devices. More particularly, the power network may consist of N_(B) buses, locally connected to loads that consume power, and N_(G) generators supplying active and reactive power to the network. The buses are interconnected by N_(L) transmission lines. N_(S) storage devices, an example of which are batteries, are also installed at a subset of the buses of the network. The network topology is represented (associated) by a directed graph

(

,

), where

stands for the nodes of the graph, representing the N_(B) buses, whereas

stands for the directed edges of the grid that represent the N_(L) transmission lines. It is evident that |

|=N_(B) and

|=2N_(L). Finally let

denote the set of generators.

Sample electric power networks schematics used by the embodiments of the present invention are provided in FIG. 1, FIG. 2, FIG. 3, and FIG. 4, for the power grids of cases IEEE30, IEEE118, PEGASE1354, and PEGASE13659 correspondingly. The numbered circles denote the buses of the grid, and the transmission lines are represented with line segments connecting the circles representing the buses. The arrows attached on the circles directed downwards, represent loads locally connected to the buses. Smaller circles enclosing a tilde or the letter ‘c’ represent the generators connected to the buses.

Although the circle numbers, segments, arrows, tildes and other symbols in FIG. 2, FIG. 3, and FIG. 4, are not readable, and are even less comprehensible in FIG. 3, and FIG. 4, the scope of these figures is not to precisely identify buses, transmission lines, and their connections to generators or loads, but instead to give an idea on the increasingly higher complexity of the networks that can be processed by the method of the present invention.

The MPOPF Problem

In general the OPF problem optimises the operation of an electric power system, specifically, the generation and transmission of electricity, subject to the physical constraints imposed by electrical laws, network operations, and engineering limits on the decision variables. The objective is to minimise generation cost, maximise market surplus, or minimise active transmission loses.

Modern trends for large-scale integration of renewable energy sources, however, bring additional challenges to power grid operations and modeling. Distributed energy storage devices are commonly employed as an effective approach for addressing operational challenges. However, the modeling of storage devices results in intertemporal coupling of the individual OPF problems defined at each subdivision of the time period of interest. The resulting MPOPF problem becomes intractable, for prior art methods, prohibiting using these methods for forecasting and planning over long time periods or even small time periods subdivided into a large number of smaller time intervals to allow for exploitation of more precise data about the network. According to the method of the present invention, as will be apparent from the following description, such an MPOPF problem may be solved in a time effective way. The following input parameters to the MPOPF may be taken into consideration.

Input to the MPOPF Problem

Input parameters to the optimal control method MPFOPT are the following.

-   -   1.         (         ,         ), N_(G), N_(L), N_(S): The graph, the number of generators, the         number of transmission lines, and the number of storage devices.     -   2. I_(G), I_(S): The locations of generators, and the locations         of storage devices.     -   3. α_(l), β_(l), γ_(l): The conductance and the susceptance of         the line, as well as the shunt capacitance γ_(l) of the line for         l∈         .     -   4. d_(b) ^(P), d_(b) ^(Q): Active and reactive power demand at         bus b∈         .     -   5. f_(l) ^(max): Thermal flow limit for every line l∈         .     -   6. V_(b) ^(max), V_(b) ^(min): Maximum and minimum voltage level         for each bus b∈         .     -   7. p_(g) ^(max), d_(g) ^(min): Maximum and minimum active power         levels for each generator g∈         .     -   8. q_(g) ^(max), q_(g) ^(min): Maximum and minimum reactive         power levels for each generator g∈         .     -   9.         _(t) ^(max),         _(t) ^(min): Maximum and minimum tap ratio limits for         transformer t∈         .     -   10. a_(g), b_(g), c_(g): Constant, linear, and quadratic term of         the power generation cost function for generator g∈         .     -   11. η_(c,s), η_(s,d): Charging and discharging ratios for each         storage device s∈S.

Objectives

One of the most frequent objectives of the MPOPF problem is to minimise generation cost. Assuming g∈G and a_(g), b_(g), c_(g) are cost related coefficients for each generation unit, the generation cost is usually approximated as a quadratic function of the associated powers of each unit:

$\begin{matrix} {{{f\left( p_{n}^{g} \right)} = {{\sum\limits_{n = 1}^{N}{\sum\limits_{g = 1}^{N_{G}}{a_{g}\left( p_{n}^{g} \right)}^{2}}} + {b_{g}p_{n}^{g}} + c_{g}}},} & (1) \end{matrix}$

although any nonlinear form could be used other than the quadratic. Other nonlinear functions are also not excluded representing either market surplus or active transmission loses.

Constraints of the MPOPF Problem

At every time period n=1, 2, . . . , N the MPOPF problem is subject to linear and nonlinear equality and inequality constraints. For clarity and simplicity, the time dependence indicated by the subscript n from every variable is introduced only later in the description, to emphasize the intertemporal time coupling introduced by the linear inequality constraints related to the energy levels of the storage devices.

-   -   Let         _(i) stand for the set of buses connected through a transmission         line to the ith bus. Let l be a transmission line from bus i to         bus j, l=(i,j), and θ_(ij)=θ_(i)−θ_(j). The MPOPF constraints         are the following:

1. Reference bus b₀:

θ_(b) ₀ =0.  (2)

2. Equality constraints: Kirchhoff's current law

$\begin{matrix} {\mspace{79mu} {{{{\sum\limits_{{g|I_{g}} = b}p_{g}} - d_{b}^{P}} = {\sum\limits_{l \in \mathcal{L}_{i}}f_{l}^{P}}},{\forall{b \in \mathcal{B}}},}} & (3) \\ {\mspace{79mu} {{{{\sum\limits_{{g|I_{g}} = b}q_{g}} - d_{b}^{}} = {{\sum\limits_{l \in \mathcal{L}_{i}}f_{l}^{}} - {\frac{1}{2}V_{b}^{2}{\sum\limits_{l \in \mathcal{L}_{i}}\gamma_{l}}}}},{\forall{b \in \mathcal{B}}},}} & (4) \\ {f_{l}^{P} = \left\{ \begin{matrix} {{{\alpha_{l}V_{i}^{2}} - {V_{i}{V_{j}\left( {{\alpha_{l}{\cos \left( \theta_{ij} \right)}} + {\beta_{l}{\sin \left( \theta_{ij} \right)}}} \right)}}},} & {{l \in \mathcal{L}},} \\ {{{\alpha_{l}\frac{V_{i}^{2}}{_{t}^{2}}} - {\frac{V_{i}V_{j}}{_{t}}\left( {{\alpha_{t}{\cos \left( \theta_{ij} \right)}} + {\beta_{t}{\sin \left( \theta_{ij} \right)}}} \right)}},} & {{l \in },{{bus}\mspace{14mu} i\mspace{20mu} {tapped}},} \\ {{{\alpha_{l}V_{i}^{2}} - {\frac{V_{i}V_{j}}{_{t}}\left( {{\alpha_{t}{\cos \left( \theta_{ij} \right)}} + {\beta_{t}{\sin \left( \theta_{ij} \right)}}} \right)}},} & {{l \in },{{bus}\mspace{14mu} j\mspace{14mu} {tapped}},} \end{matrix} \right.} & (5) \\ {f_{l}^{} = \left\{ \begin{matrix} {{{{- \beta_{l}}V_{i}^{2}} - {V_{i}{V_{j}\left( {{\alpha_{l}{\sin \left( \theta_{ij} \right)}} - {\beta_{l}{\cos \left( \theta_{ij} \right)}}} \right)}}},} & {{l \in \mathcal{L}},} \\ {{{{- \beta_{l}}\frac{V_{i}^{2}}{_{t}^{2}}} - {\frac{V_{i}V_{j}}{_{t}}\left( {{\alpha_{t}{\sin \left( \theta_{ij} \right)}} - {\beta_{t}{\cos \left( \theta_{ij} \right)}}} \right)}},} & {{l \in },{{bus}\mspace{14mu} i\mspace{20mu} {tapped}},} \\ {{{{- \beta_{l}}V_{i}^{2}} - {\frac{V_{i}V_{j}}{_{t}}\left( {{\alpha_{t}{\sin \left( \theta_{ij} \right)}} - {\beta_{t}{\cos \left( \theta_{ij} \right)}}} \right)}},} & {{l \in },{{bus}\mspace{14mu} j\mspace{14mu} {{tapped}.}}} \end{matrix} \right.} & (6) \end{matrix}$

3. Nonlinear inequality constraints: thermal line flow

(f _(l,n) ^(P))²+(f _(l) ^(Q))²≤(f _(l) ^(max))² ∀l∈

.  (7)

4. Box constraints: active and reactive power

p _(g) ^(min) ≤p _(g) ≤p _(g) ^(max) ∀g∈

,  (8)

q _(g) ^(min) ≤q _(g) ≤q _(g) ^(max) ∀g∈

,  (9)

5. Box constraints: voltage levels and angles

θ_(b) ^(min)≤θ_(b)≤θ_(b) ^(max) ∀b∈

,  (10)

V _(b) ^(min) ≤V _(b) ≤V _(b) ^(max) ∀b∈

,  (11)

6. Linear inequality constraints: energy level of storages

-   -   The energy level of the storage devices ϵ_(n) at the nth time         period, is computed from ϵ_(n−1) through the formula

ϵ_(n)=ϵ_(n−1) +Bp _(n−1) ^(S) ,n=1,2, . . . ,N,  (12)

-   -   where p_(n) ^(S)=[(p_(n) ^(Sd))^(T) (p_(n) ^(Sc))^(T)]^(T) ∈         ^(2N) ^(s) is the vector of active storage power injection at         the nth time period and the matrix B∈         ^(N) ^(S) ^(×2N) ^(S) is

$\begin{matrix} {B = {\delta \; {t\begin{bmatrix} {- \eta_{d,1}^{- 1}} & \; & \; & \eta_{c,1}^{- 1} & \; & \; \\ \; & \ddots & \; & \; & \ddots & \; \\ \; & \; & {- \eta_{d,N_{s}}^{- 1}} & \; & \; & \eta_{c,N_{s}}^{- 1} \end{bmatrix}}}} & (13) \end{matrix}$

-   -   with η_(d,i), and η_(c,i), i=1, . . . , N_(S) being the         discharging and charging efficiencies. The vector of storage         levels has to be bounded at each time period n,

ϵ^(min)≤ϵ_(n)≤ϵ^(max).  (14)

-   -   Additionally, the storage level at the end of the dispatch         horizon N may be required to match its initial value in order to         prevent depletion of the storage:

ϵ_(N)=ϵ₀.  (15)

-   -   Both constraints are linear and they can be jointly written as

$\begin{matrix} {{\underset{\underset{\epsilon^{S,\min}}{}}{\begin{bmatrix} \epsilon^{\min} \\ \epsilon^{\min} \\ \vdots \\ \epsilon^{\min} \\ \epsilon_{0} \end{bmatrix}} \leq {\underset{\underset{E^{0}}{}}{\begin{bmatrix} \epsilon_{0} \\ \epsilon_{0} \\ \vdots \\ \epsilon_{0} \\ \epsilon_{0} \end{bmatrix}} + {\underset{\underset{E^{s}}{}}{\begin{bmatrix} B & 0 & \ldots & 0 \\ B & B & \ldots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ B & B & \ldots & B \\ B & B & \ldots & B \end{bmatrix}}\underset{\underset{p^{s}}{}}{\begin{bmatrix} p_{1}^{S} \\ p_{2}^{S} \\ \vdots \\ p_{N}^{S} \end{bmatrix}}}} \leq \underset{\underset{\epsilon^{S,\max}}{}}{\begin{bmatrix} \epsilon^{\max} \\ \epsilon^{\max} \\ \vdots \\ \epsilon^{\max} \\ \epsilon_{0} \end{bmatrix}}},} & (16) \end{matrix}$

-   -   where the equality constraint has been written as an inequality         constraint with equal upper and lower bounds.

The MPOPF Problem

The resulting optimization problem is a general nonlinear optimization problem:

$\begin{matrix} {{{\underset{\theta,v,p,q}{minimize}\; {\sum\limits_{n = 1}^{N}{\sum\limits_{l = 1}^{N_{G}}{a_{l}\left( P_{n}^{l} \right)}^{2}}}} + {b_{l}P_{n}^{l}} + {c_{l}\mspace{20mu} ({MPOPF})}}{{{subject}\mspace{14mu} {to}\mspace{14mu} (2)},(3),(4),(7),(8),(9),(10),{{(11){\forall n}} = 1},2,\ldots \;,{N.}}} & (16) \end{matrix}$

Each one of the control parameter vectors {θ, v, p, q} stands for the variables from the time periods n=1, . . . , N. The angles are ordered as θ=[θ₁ ^(T), . . . , θ_(N) ^(T)]^(T). The voltages, the active, and the reactive powers are ordered similarly. The N OPF problems could be solved independently from each other if it was not for storage inequality constraints (16) that couple storage powers from all time steps. For this reason the N OPF problems have to be solved coupled with the storage inequality constraints. The resulting (MPOPF) problem can be solved using any general purpose NLP solver like IPOPT (Andreas Wächter and Lorenz T. Biegler. Line search filter methods for nonlinear programming: motivation and global convergence. SIAM J. Optim., 16(1):1-31 (electronic), 2005), (Andreas Wächter and Lorenz T. Biegler. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math. Program., 106(1, Ser. A):25-57, 2006), MIPS (H. Wang, C. E. Murillo-Sanchez, R. D. Zimmerman, and R. J. Thomas. On computational issues of market-based optimal power flow. IEEE Transactions on Power Systems, 22(3):1185-1193, August 2007), or KNITRO (Richard H. Byrd, Jorge Nocedal, and Richard A. Waltz. Knitro: An Integrated Package for Nonlinear Optimization, pages 35-59. Springer U S, Boston, Mass., 2006. ISBN 978-0-387-30065-8). The computational complexity grows quickly for longer dispatch horizons N. However, according to the method of the present invention as specifically disclosed below, a particularly efficient solution is found due to the special structure of the time coupling storage constraints defined by E^(S).

Interior Point Methods

The present invention proposes an efficient IP algorithm, MPFOPT, particularly designed for MPOPF problems. The MPFOPT algorithm is demonstrated to provide several orders of magnitude faster solution times than standard optimization methods like IPOPT, MIPS, and KNITRO, using significantly fewer amounts of memory. The (MPOPF) problem can be abbreviated as a general nonlinear optimal control problem with both linear and nonlinear inequality constraints:

$\begin{matrix} {{\underset{x}{minimize}\mspace{14mu} {f(x)}}\mspace{14mu}} & ({IP}) \\ {{{{subject}\mspace{14mu} {to}\mspace{14mu} {c_{E}(x)}} = 0},} & (a) \\ {{h^{\min} \leq {h(x)} \leq h^{\max}},} & (b) \\ {{a^{\min} \leq {Ax} \leq a^{\max}},} & (c) \\ {{x^{\min} \leq x \leq x^{\max}},} & (d) \end{matrix}$

where x∈

^(N) ^(x) , c_(E) (x) ∈

^(N) ^(E) and (IP) (c) accounts for the equality constraints (2), (3), and (4) of the (MPOPF), h(x) ∈

^(N) ^(h) and (IP) (b) represents the thermal inequality constraints (7), the matrix A∈

^(N) ^(A) ^(×N) ^(x) introduces linear inequality constraints (IP) (c) related to the storage devices (16), and (IP) (d) represents the box constraints on active and reactive powers (8), (9), and voltages (10) and angles (11).

In the above N_(x)=2N_(B)+2N_(G) stands for the total number of control variables, N_(E)=2N_(B)+2N_(G) the number of equality constraints, N_(h)=4N_(e) the number of nonlinear inequality constraints, and N_(A)=(N+1) N_(S) the number of linear inequality constraints.

Interior Point Solution Framework

The method of the present invention executes an interior point optimization algorithm in a computer system to solve the optimal control problem defined over a time period of interest T, where the objective function associated with the optimal control problem represents the total fuel consumption of the generators for the time period of interest T.

For clarity, we let nonlinear and linear inequality constraints be represented by the single vector c_(I)(x). The vectors indicating the combined inequality constraints and their associated lower and upper bounds are

$\begin{matrix} {{{c_{I}(x)} = \begin{bmatrix} {h(x)} \\ {Ax} \\ x \end{bmatrix}},{c^{\min} = \begin{bmatrix} h^{\min} \\ a^{\min} \\ x^{\min} \end{bmatrix}},{c^{\max} = {\begin{bmatrix} h^{\max} \\ a^{\max} \\ x^{\max} \end{bmatrix}.}}} & (17) \end{matrix}$

Slack variables s∈

^(N) ^(h) ^(+N) ^(A) , s>0, are introduced to convert inequality constraints to equality constraints shifting the upper and lower bounds to themselves as non negativity constraints. The non negativity constraints then are replaced by the standard log barrier function, obtaining a sequence of μ-subproblems (IP(μ)),

$\begin{matrix} {{{\underset{x}{minimize}\mspace{14mu} {f(x)}} - {\mu {\sum\limits_{i = 1}^{N}{\log \left( s_{i} \right)}}}},} & \left( {{IP}(\mu)} \right) \\ {{{{subject}\mspace{14mu} {to}\mspace{14mu} {c_{E}(x)}} = 0},} & (a) \\ {{{{c_{I}(x)} - s} = 0},} & (b) \\ {s > 0.} & (c) \end{matrix}$

Each subproblem (IP(μ)) is solved approximately and while μ decreases, the solution of the next barrier problem is obtained using, as a starting guess, the approximate solution of the previous one. While the barrier parameter μ>0 is driven to zero and provided that the objective function and the constraints are sufficiently smooth, the limit of the corresponding solutions of (IP(μ)) satisfies first order optimality conditions for (IP) when the constraint Jacobian has full rank (Jorge Nocedal and Stephen J. Wright. Numerical Optimization: Springer Series in Operations Research and Financial Engineering. Springer, 2006). The algorithm does not require the feasibility of the iterates with respect to the inequality constraints, but only forces the slack variables to remain positive. The solutions of (IP(μ)) are critical points of the Lagrangian function

$\begin{matrix} {{L\left( {x,s,\lambda_{E},\lambda_{I}} \right)} = {{f(x)} - {\mu {\sum\limits_{i = 1}^{N}{\log \left( s_{i} \right)}}} + {\lambda_{E}^{\top}{c_{E}(x)}} + {\lambda_{I}^{\top}\left( {{c_{I}(x)} - s} \right)}}} & (18) \end{matrix}$

and thus satisfy the KKT conditions

∇_(x) f(x)+λ^(T) _(E)∇_(x) c _(E)(x)+λ_(I) ^(T)∇_(x) c _(I)(x)=0,

−μe−Sλ _(I)=0,

c _(E)(X)=0,

c _(I)(x)−s=0,  (19)

where the last of the equations has been obtained by post multiplying with S=diag (s) and e is a vector with all its entries equal to one. For convenience, we define the Jacobian of the equality constraints J_(E)=∇_(x)c_(E)(x) and the Jacobian of the inequality constraints J_(I)=∇_(x)c_(I)(x).

The optimality error E₀ (x, s, λ_(E), λ_(I)) is defined as the maximum of the ∥ ∥_(∞) norms of the individual parts of the KKT conditions (19), appropriately scaled to account for the case where the Lagrange multipliers λ_(I), λ_(E) and the slack variables s can become very large (see (Andreas Wächter and Lorenz T. Biegler. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math. Program., 106(1, Ser. A):25-57, 2006) for details). The algorithm terminates if the optimality error at an approximate solution (x^(kT), s^(kT), λ_(E) ^(kT), λ_(I) ^(kT))^(T) is such that E₀(x^(k), s^(k), λ_(E) ^(k), λ_(I) ^(k))≤ϵ_(tol), where ϵ_(tol) is the user provided error tolerance.

According to the present invention, the interior point algorithm is characterized by the fact of executing the following steps:

storing a KKT system associated with the optimality conditions for the Lagrangian associated with said objective function and said constraints defined for said time period T, the KKT system including a Hessian matrix H;

reordering the KKT system to obtain a reordered KKT system where the Hessian matrix H after the reordering has an arrowhead structure with diagonal blocks A_(n) and off diagonal blocks B_(n) comprising several identical copies of constant in time matrix B of charging and discharging ratios of said storages device;

executing a direct Schur complement based factorisation and solution algorithm on said reordered KKT system;

returning output parameters for said network, buses, loads, generators and storages devices as a solution of said optimal control problem for each of said time intervals.

All these steps are explained in more detail below.

Solution of the Barrier Subproblem (IP(μ))

The computation of the search direction is obtained by a damped Newton method applied on the KKT conditions (19). Let k denote the iteration counter for the problem (IP(μ)). The solution update iterate (x^(k+1), s^(k+1), λ_(E) ^(k+1), λ_(I) ^(k+1)), is obtained from (x^(k), s^(k), λ^(k), λ_(I) ^(k)) and the search directions (δx^(k), δs^(k), δλ_(E) ^(k), δλ_(I) ^(k)), which are computed from the linearisation of the KKT conditions at (x^(k), s^(k), λ_(E) ^(k), λ_(I) ^(k)), to obtain the KKT system

$\begin{matrix} {{{\begin{bmatrix} H & 0 & J_{E}^{\top} & J_{I}^{\top} \\ 0 & {{- S^{- 1}}\Lambda_{I}} & 0 & {- I} \\ J_{E} & 0 & 0 & 0 \\ J_{I} & {- I} & 0 & 0 \end{bmatrix}\begin{bmatrix} {\delta \; x^{k}} \\ {\delta \; s^{k}} \\ {\delta \; \lambda_{E}^{k}} \\ {\delta \; \lambda_{I}^{k}} \end{bmatrix}} = {- \begin{bmatrix} {\left( {\nabla_{x}{f(x)}} \right)^{\top} + {J_{E}^{\top}\lambda_{E}} + {J_{I}^{\top}\lambda_{I}}} \\ {{{- \mu}\; S^{- 1}e} - \lambda_{I}} \\ {c_{E}(x)} \\ {{c_{I}(x)} - s} \end{bmatrix}}},} & (20) \end{matrix}$

where H=∇_(xx)L and, similarly for S, Λ_(I)=diag (λ_(I)). To enforce symmetry we have multiplied the second equation with S⁻¹. In practice, however, in order to guarantee certain descent properties of the filter line-search procedure (Andreas Wächter and Lorenz T. Biegler. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math. Program., 106 (1, Ser. A):25-57, 2006), the diagonal blocks of the KKT matrix at the left-hand side of (20) are modified by multiples of the identity matrix as described in (Andreas Wächter and Lorenz T. Biegler. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math. Program., 106 (1, Ser. A):25-57, 2006). For large-scale optimal control problems, the computation of the search directions determines the running time of the optimal control problem. Hence, any attempt accelerating the solution of (IP) should focus on the efficient solution of the KKT linear system (20).

Solution of the KKT System

A widespread approach for solving KKT systems consists of employing black-box solution techniques of multifrontal sparse LU type (O. Schenk and K. Gärtner. On fast factorization pivoting methods for sparse symmetric indefinite systems. Elec. Trans. Numer. Anal., 23:158-179, 2006), (Timothy A. Davis and lain S. Duff. An unsymmetric-pattern multifrontal method for sparse lu factorization. SIAM Journal on Matrix Analysis and Applications, 18(1):140-158, 1997), (Hsl. a collection of fortran codes for large scale scientific computation. URL http://www.hsl.rl.ac.uk), due to their accuracy and robustness. However, such solvers are not aware of the particular structural properties of the generated KKT systems, which appropriately exploited could result in significant computational savings. According to the invention, a direct sparse technique adapted to the temporal structure of the MPOPF problem is used.

Temporal Structure Revealing Ordering

Each one of the variables of every iterate (x, s, λ_(E), λ_(I)) represents the corresponding parameters from all time periods. More precisely,

x=[θ^(T) V ^(T) p ^(T) q ^(T)]^(T),θ=[θ₁ ^(T) θ₂ ^(T) . . . θ_(N) ^(T)]^(T),

and the rest of the variables v, p, q are ordered in a similar way. According to the invention, the following ordering has been adopted to reveal the temporal structure of the Hessian:

u=[x ₁ ^(T),λ_(E1) ^(T),λ_(I1) ^(T) ,s ₁ ^(T) , . . . x _(N) ^(T),λ_(EN) ^(T),λ_(IN) ^(T) ,s _(N) ^(T),λ_(A) ^(T)]^(T),  (21)

where the variables x_(n), are ordered as

x _(n)=[θ_(n) ^(T) V _(n) ^(T) p _(n) ^(T) q _(n) ^(T)]^(T),  (22)

and s_(E) ∈

^(N) ^(s) are the slack variables for the storage equality constraints (16), introduced as an inequality constraint with identical upper and lower bounds. This constraint couples all time steps and unless it is ordered after all other variables, we cannot then obtain the reordered KKT system (24). Under the new ordering (21) the Hessian matrix obtains the arrowhead structure with the diagonal blocks A_(n) also reordered:

$\begin{matrix} {\begin{bmatrix} A_{1} & \; & \; & \; & B_{1} \\ \; & A_{2} & \; & \; & B_{2} \\ \; & \; & \ddots & \; & \vdots \\ \; & \; & \; & A_{N} & B_{N} \\ B_{1}^{\top} & B_{2}^{\top} & \ldots & B_{N}^{\top} & C \end{bmatrix},{A_{n} = {\begin{bmatrix} H_{n} & J_{En}^{\top} & J_{In}^{\top} & 0 \\ J_{En} & 0 & 0 & 0 \\ J_{In} & 0 & 0 & {- S_{n}} \\ 0 & 0 & {- S_{n}} & \Lambda_{In} \end{bmatrix}.}}} & (23) \end{matrix}$

The sparse structure of the Hessian for the power network described by case IEEE30 with N=5 is depicted in FIG. 7 before the reordering and in FIG. 8 after the reordering. The reordered KKT system becomes

$\begin{matrix} {{\begin{bmatrix} A_{1} & \; & \; & \; & B_{1} \\ \; & A_{2} & \; & \; & B_{2} \\ \; & \; & \ddots & \; & \vdots \\ \; & \; & \; & A_{N} & B_{N} \\ B_{1}^{\top} & B_{2}^{\top} & \ldots & B_{N}^{\top} & C \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ \vdots \\ x_{N} \\ x_{c} \end{bmatrix}} = \begin{bmatrix} b_{1} \\ b_{2} \\ \vdots \\ b_{N} \\ b_{c} \end{bmatrix}} & (24) \end{matrix}$

and it is solved with the Schur-based approach described next.

The Direct Schur-Based Approach

The arrowhead structure of the reordered KKT system (24) calls for a direct Schur-complement-based solution approach. The algorithm is well known (Cosmin G. Petra, Olaf Schenk, Miles Lubin, and Klaus Gärtner. An augmented incomplete factorization approach for computing the schur complement in stochastic optimization. SIAM Journal on Scientific Computing, 36 (2): C139-C162, 2014b), (C. G. Petra, O. Schenk, and M. Anitescu. Real-time stochastic optimization of complex energy systems on high-performance computers. Computing in Science Engineering, 16 (5):32-42, September 2014a) and it is sketched in Alg. 1 for the factorization and Alg. 2 for the associated solution. The Schur complement of each individual block at the step Alg.1.5, is computed by an incomplete augmented factorization technique that solves the sparse linear systems with multiple right-hand sides at once using an incomplete sparse factorization of an auxiliary matrix. This technique is implemented in the direct sparse solver PARDISO (O. Schenk and K. Gärtner. On fast factorization pivoting methods for sparse symmetric indefinite systems. Elec. Trans. Numer. Anal., 23:158-179, 2006); see (Cosmin G. Petra, Olaf Schenk, Miles Lubin, and Klaus Gärtner. An augmented incomplete factorization approach for computing the schur complement in stochastic optimization. SIAM Journal on Scientific Computing, 36(2):C139-C162, 2014b), (C. G. Petra, O. Schenk, and M. Anitescu. Real-time stochastic optimization of complex energy systems on high-performance computers. Computing in Science Engineering, 16(5):32-42, September 2014a) for more details. The auxiliary matrix provided to PARDISO is the augmented block matrix P_(n),

$\begin{matrix} {{P_{n} = \begin{bmatrix} A_{n} & B_{n} \\ B_{n}^{\top} & 0 \end{bmatrix}},} & (25) \end{matrix}$

the structure of which is depicted in FIG. 9 for the power network described by case IEEE30 and N=5 and in FIG. 10 for the same power network and N=240. In this mode, PARDISO factorizes only the A_(n), block of the matrix and then computes the Schur complement S_(n), which is a dense matrix if the columns of B_(n), are all nonzero. The final Schur complement S_(c) is in general dense, or it consists of a very large dense block. The dense system at the step Alg.1.8 and Alg.2.7 can be solved with a dense LU decomposition using LAPACK (E. Anderson, Z. Bai, C. Bischof, S. Blackford, J. Demmel, J. Dongarra, J. Du Croz, A. Greenbaum, S. Hammarling, A. McKenney, and D. Sorensen. LAPACK Users' Guide. Society for Industrial and Applied Mathematics, Philadelphia, Pa., third edition, 1999).

For a relatively small number of time periods N<100, Alg. 1, Alg. 2, and PARDISO applied on the prereordered KKT system (20) have similar runtime performance. However, as the number of time periods N increases, the Schur complements S_(n) of the augmented P_(n) blocks exceed by far the size of the A_(n) blocks. As a result the solution approach based on Alg. 1, Alg. 2 becomes ineffective both with respect to the computational time and with respect to memory consumption, compared with the direct sparse solver PARDISO applied on the original prereordered KKT system (20). The performance, however, can be further improved by exploiting the particular structure of the off diagonal blocks B_(n) described next.

Algorithm 1 Direct Schur-based factorization.  1: function DIRECTSCHURFACTORIZATION(A_(n), B_(n), C, n = 1, ..., N)  2:  S_(c) := C  3:  for n = 1 : N do  4:   [L_(n), U_(n)] := pardisoFactorize(A_(n))  5:   S_(n) := −B_(n)A_(n) ⁻¹B_(n) ^(T)  6:   S_(c) := S_(c) + S_(n)  7:  end for  8:  [L_(s), U_(s)] := luFactorize(S_(c))  9:  return [L_(n), U_(n)], n = 1, ..., N, [L_(s), U_(s)] 10: end function

Algorithm 2 Direct Schur-based back substitution.  1: function DIRECTSCHURBACKSUBSTITUTION([L_(n), U_(n)], B_(n),   n = 1, ..., N,b)  2:  r_(c) := b_(c)  3:  for n = 1 : N do  4:   y_(n):= pardisoSolve(L_(n), U_(n), b_(n))  5:   r_(c) := r_(c) − B_(n)y_(n)  6:  end for  7:  x_(c) := luSolve(L_(s), U_(s), r_(c))  8:  for n = 1 : N do  9:   r_(n) := b_(n) − B_(n) ^(T)x_(c) 10:   x_(n) := pardisoSolve(L_(n), U_(n), r_(n)) 11:  end for 12:  return x 13: end function

Exploiting Constant in Time Blocks of B_(n)

For a general B_(n) the reordering of the KKT system (20) does not lead to an approach more efficient than the one implemented in general purpose direct sparse solvers (O. Schenk and K. Gärtner. On fast factorization pivoting methods for sparse symmetric indefinite systems. Elec. Trans. Numer. Anat., 23:158-179, 2006), (Hsl. a collection of fortran codes for large scale scientific computation. URL http://www.hsl.rl.ac.uk), (Timothy A. Davis and lain S. Duff. An unsymmetric-pattern multifrontal method for sparse lu factorization. SIAM Journal on Matrix Analysis and Applications, 18(1):140-158, 1997), despite the convenient arrowhead sparse structure that allows the direct Schur complement-based algorithm, Alg. 1. The equations of storage devices however, give rise to B_(n) with special properties that allow for a much more efficient implementation of Alg. 1.

More precisely, the matrices B_(n), n=1, 2, . . . , N, obtain the form

$\begin{matrix} {{\begin{bmatrix} B_{1} \\ B_{2} \\ \vdots \\ B_{n} \\ \vdots \\ B_{N} \end{bmatrix} = \begin{bmatrix} 0 & B_{1}^{1} & B & B & B & \ldots & B \\ 0 & B_{2}^{1} & B_{2}^{2} & B & B & \ldots & B \\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & B_{n}^{1} & O & B_{n}^{2} & B & \ldots & B \\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & B_{N}^{1} & 0 & 0 & \ldots & 0 & B_{N}^{2} \end{bmatrix}},} & (26) \end{matrix}$

where

${O = 0_{n - 2}},{0_{m} = \underset{\underset{m}{}}{\begin{bmatrix} 0 & 0 & \ldots & 0 \end{bmatrix}}},$

and B∈

^(N) ^(A) ^(×N) ^(s) . It is not hard, after some algebraic manipulations, to see that the Schur complement matrix for the nth block S_(n) will obtain the form

$\begin{matrix} {S_{n} = {\begin{bmatrix} 0 & 0 & O & 0 & 0 & \ldots & 0 \\ 0 & S_{11} & O & S_{12} & S_{10} & \ldots & S_{10} \\ O & O & O & O & O & \ldots & O \\ 0 & S_{12}^{\top} & O & S_{22} & S_{20} & \ldots & S_{20} \\ 0 & S_{10}^{\top} & O & S_{20}^{\top} & S_{00} & \ldots & S_{00} \\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & S_{10}^{\top} & O & S_{20}^{\top} & S_{00}^{\top} & \ldots & S_{00} \end{bmatrix}_{n}.}} & (27) \end{matrix}$

Let S_(n) ³ be the top 3 by 3 block matrix of S_(n):

$\begin{matrix} {S_{n}^{3} = {\begin{bmatrix} S_{11} & S_{12} & S_{10} \\ S_{12}^{\top} & S_{22} & S_{20} \\ S_{10}^{\top} & S_{20}^{\top} & S_{00} \end{bmatrix}.}} & (28) \end{matrix}$

It is evident from the structure of S_(n) that only S_(n) ³ needs to be computed, since the rest of the rows and columns are direct replicates of the entries of the last row and column of S_(n) ³. Thus, the computation of S_(n) becomes independent of the number of time periods N and it only depends on the number of storage devices N_(S), since each one of the blocks of S_(n) has size N_(S)×N_(S). The global Schur complement S, after the end of the loop at Alg.1.7 will have the form

$\begin{matrix} {{S_{c} = \begin{bmatrix} S_{11} & S_{12} & S_{13} & S_{14} & \ldots & S_{1N} \\ S_{12}^{\top} & S_{22} & S_{23} & S_{23} & \ldots & S_{23} \\ S_{13}^{\top} & S_{23}^{\top} & S_{33} & S_{34} & \ldots & S_{34} \\ S_{14}^{\top} & S_{23}^{\top} & S_{34}^{\top} & S_{44} & \ldots & S_{45} \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ S_{1N}^{\top} & S_{23}^{\top} & S_{34}^{\top} & S_{45}^{\top} & \ldots & S_{NN} \end{bmatrix}},} & (29) \end{matrix}$

where each block of the first block row and column have dimensions 2N_(S)×2N_(S), whereas the remaining blocks of S_(c) have dimensions N_(S)×N_(S). Storing S_(c) due to its special structure, requires only three block vectors: one for the first block column S₁ of size 2N_(S)(N+1)×2N_(S), one for the diagonal blocks S_(d) of size N_(S)×NN_(S), and one for the off diagonal blocks S_(o) of size N_(S)×(N−1)N_(S),

S ₁=[S ₁₂ S ₁₃ S ₁₄ . . . S _(1N)],  (30)

S _(d)=[S ₂₂ S ₃₃ S ₄₄ . . . S _(NN)],  (31)

S _(o)=[S ₂₃ S ₃₄ S ₄₅ . . . S _(N−1N)],  (32)

significantly reducing this way the storage requirements for S_(c).

The matrix S_(c) may be written as a 2 by 2 block matrix

$\begin{matrix} {{S_{c} = \begin{bmatrix} S_{11} & S_{1} \\ S_{1}^{\top} & S_{22} \end{bmatrix}},} & (33) \end{matrix}$

where the matrix S₂₂ is what remains from S_(c) if we remove the first block row and column. The vectors r_(c), x_(c) may be partitioned as r_(c)=[r_(c) ^(l) r_(c) ²]^(T), x_(c)=[x_(c) ¹ x_(c) ²]^(T), where the size of x_(c) ¹ is equal to the number of rows of the S₁₁ block. Once the Schur complement S_(c) has been computed, the dense linear system on line Alg.2.7 has to be solved for x_(c).

This is achieved by forming the Schur complement of S_(c) with respect to the S₁₁ block as described in Alg. 3. The operator S₂₂ in all three steps of Alg. 3 is inverted

Algorithm 3 Schur-based method for the Schur system. 1: function SOLVEDENSESCHUR(S₁₁, S₁, S₂₂, r_(c)) 2:  S := S₁₁ − S₁S₂₂ ⁻¹S₁ ^(T) 3:  x_(c) ¹ := S⁻¹(r_(c) ¹ − S₁S₂₂ ⁻¹r_(c) ²) 4:  x_(c) ² := S₂₂ ⁻¹(r_(c) ² − S₁ ^(T)x_(c) ¹) 5:  return x_(c) 6: end function by an LDL^(T) factorization (Gene H. Golub and Charles Van Loan. Matrix Computations. The Johns Hopkins University Press, 3rd edition, 1996). The factorization has complexity O(n³) for general symmetric matrices of

^(n×n) and the associated back substitution has complexity O(n²). Exploiting the fact that the blocks below the main diagonal of each column of S₂₂ are identical, we can perform the factorization in O(n²) operations. At the same time, according to the present invention, in order to save memory we can operate in block vector representations of the matrices instead of dense block matrices. The algorithms described next operate on the block vector representation S_(d), S_(o), of the matrix S₂₂. The LDL^(T) factorization of S₂₂ only requires block vector representation of the factors. This process is summarized in Alg. 4. The back substitution can be performed in O(n) instead

Algorithm 4 Structure-exploiting LDL^(T) factorization.  1: function BLOCKLDLTFACT(S_(d), S_(o))  2:  L := S_(d), U := S_(o), D := S_(o)  3:  for k = 1 : N − 1 do  4:   L_(k+1) := L_(k+1)/D_(k)  5:   for j = k + 1 : N − 1 do  6:    D_(j) := D_(j) − L_(k+1)U_(k+1)  7:    L_(j+1) := L_(j+1) − L_(k+1)U_(k+1)  8:    U_(j+1) := U_(j+1) − L_(k+1)U_(k+1)  9:   end for 10:   D_(N) := D_(N) − L_(N)U_(N) 11:  end for 12:  return L, D, U 13: end function of O(n²). This process is summarized in the Alg. 5. Since the matrix S₂₂ has a block structure with N−1 blocks in

^(N) ^(S) ^(×N) ^(S) , the complexity for the factorization is O((N−1)²N_(S) ³) and for the back substitution O((N−1)N_(S) ²).

Algorithm 5 Structure-exploiting LDL^(T) backsubstitution.  1: function BLOCKLDLTSOLVE(L, D, U, B)  2:  Y := B   

 Solve LY = B  3:  Y_(s):= L₂Y₁  4:  for k = 1 : N − 1 do  5:   Y_(k) := Y_(k) − Y_(s)  6:   Y_(s) := Y_(s) + L_(k+1) Y_(k)  7:  end for  8:  Y_(N) := Y_(N) − Y_(s)  9:  X_(N) := D_(N) Y_(N)

 Solve DUX = Y 10:  X_(s) := X_(N) 11:  for k = N − 1 : 1 do 12:   X_(k) := Y_(k) − U_(k+1)X_(s) 13:   X_(k) := D_(k) X_(k) 14:   X_(s) := X_(s) + X_(k) 15:  end for 16:  return X 17: end function

Memory Economical Approach

The factorization phase described in Alg. 1 stores all the sparse LU factorizations of the N matrices A_(n) in memory. However, for very detailed power grid models the associated matrices A_(n) can be very large. The same is true even for small power grid models and high values of N. In these cases the memory for storing the L, U factors may become critical and thus the approach described in Alg. 1 and Alg. 2 may not be applicable.

To remedy this problem, according to an aspect of the present invention, Alg. 6 is provided. This algorithm sacrifices performance, computing the factorisation of each diagonal block A_(n) twice. First during the computation of the global Schur complement and Schur right-hand side, at line Alg. 6.5, for computing the local contribution S_(n) to the global Schur-complement matrix S_(c) and the contribution to the Schur right-hand side r_(c). Then the factorisation is computed one more time at line Alg. 6.13 for computing the solution vector x_(n), at line Alg. 6.15. Once the factorisation serves its purpose, the algorithm releases the memory occupied by the L, U factors and proceeds to the next block A_(n+1). In contrast to the approach described by Alg. 1, only memory for a single factorisation is needed.

Algorithm 6 Low memory Schur-based approach.  1: function BLOCKLDLTSOLVE(A_(n), B_(n), C, b_(n), n = 1, ..., N)  2:  S_(c) := C  3:  r_(c) := b_(c)  4:  for n = 1 : N do  5:   [L_(n), U_(n)] := pardisoFactorize(A_(n))  6:   S_(n) := −B_(n)A_(n) ⁻¹B_(n) ^(T)  7:   S_(c) := S_(c) + S_(n)  8:   y_(n) := pardisoSolve(L_(n), U_(n), b_(n))  9:   r_(c) := r_(c) − B_(n)Y_(n) 10:  end for 11:  r_(c) := S_(c) ⁻¹r_(c) 12:  for n = 1 : N do 13:   [L_(n), U_(n)] := pardisoFactorize(A_(n)) 14:   r_(n) := b_(n) − B_(n) ^(T)x_(c) 15:   x_(n) := pardisoSolve(L_(n), U_(n), r_(n)) 16:  end for 17:  return x_(n), n = 1,..., N 18: end function

Results

In this section, the performance of MPFOPT, according to the method of the present invention, for several benchmark cases of increasing complexity, is evaluated. Simulations are performed on the reference grids modeled by IEEE30, IEEE118, PEGASE1354, and PEGASE13659 included in the MATPOWER library. The associated graphs for these networks are depicted in FIG. 1, FIG. 2, FIG. 3, and FIG. 4. We remark that the scope of these figures is not to precisely identify buses, transmission lines, and their connections to generators or loads, but instead to give an idea on the increasingly higher complexity of the networks that can be processed by the method of the present invention.

The simulation specific parameters for the grid are summarized in Table 1. For comparison we also consider three alternative optimisation algorithms provided in the MATPOWER 6.0 library (R. D. Zimmerman, C. E. Murillo-Sanchez, and R. J. Thomas. MATPOWER: Steady-State Operations, Planning, and Analysis Tools for Power Systems Research and Education. IEEE Transactions on Power Systems, 26(1):12-19, February 2011), namely, IPOPT (Andreas Wächter and Lorenz T. Biegler. Line search filter methods for nonlinear programming: motivation and global convergence. SIAM J. Optim., 16(1):1-31 (electronic), 2005), (Andreas Wächter and Lorenz T. Biegler. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math. Program., 106(1, Ser. A): 25-57, 2006) and MIPS (H. Wang. On the Computation and Application of Multi-period Security-constrained Optimal Power Flow for Real-time Electricity Market Operations. PhD thesis, Electrical and Computer Engineering, Cornell University, May 2007), (H. Wang, C. E. Murillo-Sanchez, R. D. Zimmerman, and R. J. Thomas. On computational issues of market-based optimal power flow. IEEE Transactions on Power Systems, 22(3):1185-1193, August 2007), that adopt an IP approach, and KNITRO (Richard H. Byrd, Jorge Nocedal, and Richard A. Waltz. Knitro: An Integrated Package for Nonlinear Optimization, pages 35-59. Springer U S, Boston, Mass., 2006. ISBN 978-0-387-30065-8), which implements a trust-region algorithm. All our benchmarks ran on a workstation equipped with an Intel(R) Xeon(R) CPU E7-4880 v2 at 2.50 GHz and 1 TB RAM.

For all simulations, the length of the time period is δt=1 hour. The 24 hour load scaling profile k^(D)(t) depicted in FIG. 5 was used for all benchmarks as a scaling factor of the nominal load demands s^(D) given in the MATPOWER source files to generate a time dependent load k^(D)(t)s ^(D). The profile shows significant fluctuations due to local PV infeed that was not modeled as dispatchable generator. To create load scalings for benchmarks with N>24, the profile was appended to itself repeatedly.

In each case file, the storages are located at the first N_(S) buses with positive active load demand, according to the MATPOWER source file. The storage sizes ϵ^(max) are chosen to contain up to 2 hours of the nominal active power demand of the storage buses. If storage i is located at bus k, then ϵ_(i) ^(max)=2 p_(n) ^(D,k) and ϵ^(min)=0. The storages are initially at a 70% charging level with ϵ₀=0.7ϵ^(max). The storage power ratings are limited to allow a complete discharging or charging within 3 hours or 2 hours. If p_(i) ^(n) is the discharging or charging power of storage k, then p_(i) ^(max)=ϵ_(k) ^(max)/3 or p_(i) ^(min)=−ϵ_(k) ^(max)/2. All storage discharging and charging efficiencies are chosen as η_(d,i)=0.97 and η_(c,i)=0.95.

TABLE 1 Power grid models. Name Buses Branches Generators Storages IEEE30 30 41 6 6 IEEE118 118 186 54 9 PEGASE1354 1354 1991 260 50 PEGASE13659 13659 20467 4092 100

The comparison of different optimisation algorithms is not fair unless all of them converge to the same optimal solution. This is demonstrated for all solvers in FIG. 6 for N=1200 and N=2880 where we see that all of them converge to the same objective value. The plots for all other cases are very similar and do not provide any further insights. The norms of the optimal solutions obtained with all solvers agree up to the optimality tolerance which was set to 10⁻⁵.

We observe that both IPOPT and MPFOPT have identical convergence histories. It worth noting that the objective, the infeasibility norm (not shown here), and the optimality norm for MPFOPT and IPOPT are indistinguishable. This is due to the fact that MPFOPT adopts a direct technique for solving the KIT system and, thus, it achieves a highly accurate solution similar to that obtained with direct sparse solvers like PARDISO.

A collective comparison of the performance of all solvers is provided in FIG. 11, where the total time is shown in log scale needed by each one of the solvers, MPFOPT, IPOPT, MIPS, and KNITRO to optimize the case study IEEE118 for several values of the number of time periods from N=240 up to N=2880. It is evident that MPFOPT has a similar performance to the other solvers for a very small number of time periods. However, as the number of time periods increases MPFOPT outperforms all other solvers providing orders of magnitude faster solution times. We observe that the performance gap between MPFOPT and all other solvers increases with increasing values of N. For N=2880 MPFOPT requires approximately 0.4% of the time needed by the best competitor, which in this case is IPOPT.

The performance the method of the present invention, MPFOPT, to optimize the

TABLE 2 Case IEEE118. Wall time (s) spent for the solution of the KKT system, for function evaluations (objective, gradient, Jacobian, Hessian) and for all other operations of the MPFOPT algorithm. N KKT rows Iters. KKT Functions MPFOPT Average 240 330738 24 14.3 16.4 3.2 0.4 480 661458 24 26.7 30.2 6.6 0.8 1200 1653618 23 66.3 82.7 22.7 2.2 1440 1984338 23 87.7 116.3 34.3 2.9 2400 3307218 23 159.9 205.2 74.7 5.4 2880 3968658 23 194.9 255.4 98.5 6.7 3600 4960818 23 265.9 360.5 150.9 9.3 4320 5952978 23 330.7 424.1 207.2 11.7 4800 6614418 23 395.2 501.5 260.1 13.9 5760 7937298 22 509.8 657.9 395 18.9 7200 9921618 23 738.3 1030.5 757.5 26.9 8760 12071298 23 1009.6 1515.6 1203.8 37.9 case study IEEE118 beyond the previous range of time periods N, is shown for several values of N up to N=8760 in Table 2. The average time per iteration for N=3600 up to N=8760 corresponding to one year with a time step size corresponding to one hour, is shown in FIG. 12. For this set of benchmarks, KNITRO needed more than 1 TB of memory for N=3600 and it terminated with a related error message. For N=8760, IPOPT failed due to overflow of the number of nonzero entries in the L,U factors. It is worth noting that MPFOPTmem, the memory saving approach of MPFOPT that implements Alg. 6, although it is slightly slower than the normal mode of MPFOPT (Alg. 1, Alg. 2), it is still almost four orders of magnitude faster than all other approaches and needs approximately two orders of magnitude less memory than IPOPT. No upper bound on the relative speedup of MPFOPTmem versus the other solvers exists since the gap in performance grows with increasing values of N.

We present next the performance of different components of the MPFOPT algorithm in FIG. 13. We observe that the solution of the KKT system, which consists of Alg. 1 and Alg. 2 as well as the time spent for the initialisation, shares approximately one third of the total execution time. The rest of the time is spent in function evaluations, meaning the computation of the objective, the constraints, the Hessian of the Lagrangian, the Jacobian of the constraints, and internal operations of the MPFOPT algorithm.

TABLE 3 Benchmark cases for FIG. 14. The second column shows the value of the time period N for each case, and the third column the associated size of the KKT matrix. Name N nrows IEEE30A 2880 956172 IEEE30B 4800 1593612 PEGASE1354A 240 3408100 PEGASE1354B 1200 17040100 PEGASE13659A 240 34869320 PEGASE13659B 720 104607560

Finally we present in FIG. 14 the average time per iteration of all algorithms for the solution of the benchmark cases listed in Table 3. We have used two different values of N for each case. For case IEEE30 we used N=2880, N=4800, for PEGASE1354 N=240, N=1200, and for PEGASE13659 N=240, N=720. The interrupted green bar corresponding to KNITRO for case IEEE30 with N=4800 and case PEGASE13659, N=720 indicated that KNITRO needed more than 1 TB of RAM. Although the MIPS algorithm shows a similar performance to IPOPT for a small network like IEEE30 even for large values of N=2880, we see that the same thing is not true for the larger networks PEGASE1354, PEGASE13659, where MIPS is about one order of magnitude faster than IPOPT. However, both MPFOPT and MPFOPTmem algorithms still exceed every other competitor by orders of magnitude.

While the preferred embodiments of the invention have been shown and described, modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the present invention. It will thus be seen that the objects set forth above, among those made apparent from the preceding description, are efficiently attained and, because certain changes may be made in carrying out the above method and in the construction(s) set forth without departing from the spirit and scope of the invention, it is intended that all matter contained in the above description and shown in the accompanying drawings shall be interpreted as illustrative and not in a limiting sense. It is also to be understood that the following claims are intended to cover all of the generic and specific features of the invention herein described and all statements of the scope of the invention which, as a matter of language, might be said to fall therein. 

1. A method for optimizing the power flow in an electric power network, said electric power network including a plurality of buses interconnected by transmission lines, and locally connected to loads, generators, and storage devices, the method executes an interior point optimisation algorithm in a computer system to solve an optimal control problem defined over a time period of interest T, where an objective function associated with said optimal control problem represents a total fuel consumption of the generators for said time period of interest T, said objective function depending on a plurality of parameters of said network, bus voltages, generator, and storage devices powers, said parameters of the network allowed to vary over a number N of predefined time intervals each of duration δt obtained by subdivisions of said time period of interest T, wherein said objective function is subject to constraints of said network, bus voltages, generator, and storage devices powers, characterized by the fact that said interior point algorithm includes the steps of: storing a KKT system associated with the optimality conditions for the Lagrangian associated with said objective function and said constraints defined for said time period T, the KKT system including a Hessian matrix H; reordering the KKT system to obtain a reordered KKT system where the Hessian matrix H after the reordering has an arrowhead structure with diagonal blocks A_(n), and off diagonal blocks B_(n) comprising several identical copies of constant in time matrix B of charging and discharging ratios of said storages device which are: executing a direct Schur complement based factorisation and solution algorithm on said reordered KKT system; returning output parameters for said network, buses, loads, generators, and storages devices as a solution of said optimal control problem for each of said time intervals, wherein the time and memory required to achieve the solution to the optimal control problem is drastically reduced over general purpose NLP methods, due to exploitation in the calculations involved in said Schur complement algorithm of the repetition of constant in time block matrices B of charging and discharging ratios of the storage devices inside the off diagonal blocks Bn in the reorder KKT system.
 2. Method according to claim 1 wherein said parameters include a)

(

,

), N_(G), N_(L), N_(S): The graph, the number of generators, the number of transmission lines, and the number of storage devices. b) I_(G), I_(S): The locations of generators, and the locations of storage devices. c) α_(l), β_(l), γ_(l): The conductance and the susceptance of the line, as well as the shunt capacitance γ_(l) of the line for 1∈

. d) d_(b) ^(P), d_(b) ^(Q): Active and reactive power demand at bus b∈

. e) f_(l) ^(max): Thermal flow limit for every line l∈

. f) V_(b) ^(max), V_(b) ^(min): Maximum and minimum voltage level for each bus b∈

. g) p_(g) ^(max)p_(g) ^(min): Maximum and minimum active power levels for each generator g∈

. h) q_(g) ^(min), q_(g) ^(min): Maximum and minimum reactive power levels for each generator g∈

. i)

_(t) ^(max),

_(t) ^(min): Maximum and minimum tap ratio limits for transformer t∈

. j) a_(g), b_(g), c_(g): Constant, linear, and quadratic term of the power generation cost function for generator g∈

. k) η_(c,s), η_(s,d): Charging and discharging ratios for each storage device s∈S.
 3. Method according to claim 1, wherein said reordered KKT system is in the form ${\begin{bmatrix} A_{1} & \; & \; & \; & B_{1} \\ \; & A_{2} & \; & \; & B_{2} \\ \; & \; & \ddots & \; & \vdots \\ \; & \; & \; & A_{N} & B_{N} \\ B_{1}^{\top} & B_{2}^{\top} & \ldots & B_{N}^{\top} & C \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ \vdots \\ x_{N} \\ x_{c} \end{bmatrix}} = {\begin{bmatrix} b_{1} \\ b_{2} \\ \vdots \\ b_{N} \\ b_{c} \end{bmatrix}.}$
 4. Method according to claim 1, wherein said Hessian matrix is in the form $\begin{bmatrix} A_{1} & \; & \; & \; & B_{1} \\ \; & A_{2} & \; & \; & B_{2} \\ \; & \; & \ddots & \; & \vdots \\ \; & \; & \; & A_{N} & B_{N} \\ B_{1}^{\top} & B_{2}^{\top} & \ldots & B_{N}^{\top} & C \end{bmatrix},{A_{n} = {\begin{bmatrix} H_{n} & J_{En}^{\top} & J_{In}^{\top} & 0 \\ J_{En} & 0 & 0 & 0 \\ J_{In} & 0 & 0 & {- S_{n}} \\ 0 & 0 & {- S_{n}} & \Lambda_{In} \end{bmatrix}.}}$
 5. Method according to claim 1, wherein said off diagonal blocks B_(n), n=1, 2, . . . , N, are in the form $\begin{bmatrix} B_{1} \\ B_{2} \\ \vdots \\ B_{n} \\ \vdots \\ B_{N} \end{bmatrix} = {\begin{bmatrix} 0 & B_{1}^{1} & B & B & B & \ldots & B \\ 0 & B_{2}^{1} & B_{2}^{2} & B & B & \ldots & B \\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & B_{n}^{1} & O & B_{n}^{2} & B & \ldots & B \\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & B_{N}^{1} & 0 & 0 & \ldots & 0 & B_{N}^{2} \end{bmatrix}.}$
 6. Method according to claim 1, wherein the Schur complement matrix at each time interval S_(n) is in the form ${S_{n} = \begin{bmatrix} 0 & 0 & O & 0 & 0 & \ldots & 0 \\ 0 & S_{11} & O & S_{12} & S_{10} & \ldots & S_{10} \\ O & O & O & O & O & \ldots & O \\ 0 & S_{12}^{\top} & O & S_{22} & S_{20} & \ldots & S_{20} \\ 0 & S_{10}^{\top} & O & S_{20}^{\top} & S_{00} & \ldots & S_{00} \\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & S_{10}^{\top} & O & S_{20}^{\top} & S_{00}^{\top} & \ldots & S_{00} \end{bmatrix}_{n}},$ and as such it can be represented by the independent of the number of time intervals N matrix S_(n) ³ incorporating the distinct blocks of S_(n) $S_{n}^{3} = {\begin{bmatrix} S_{11} & S_{12} & S_{10} \\ S_{12}^{\top} & S_{22} & S_{20} \\ S_{10}^{\top} & S_{20}^{\top} & S_{00} \end{bmatrix}.}$
 7. Method according to claim 1, wherein the charging/discharging ratios of said storage devices are constant in time, and in the sparse Schur complements computed for each time interval by the interior point algorithm, only a small subset of block entries, independent on the number of time periods N are computed and stored in the structure of the local sparse Schur complement.
 8. Method according to claim 1, wherein said Schur-complement-based algorithm computes and stores the global Schur complement using only 3 block vectors consisting of N dense blocks of size N_(S) by N_(S), where N_(S) is the number of storage devices.
 9. Method according to claim 1, wherein said Schur-complement-based algorithm uses a novel LDL^(T) factorisation and back substitution of the dense global Schur complement using only three block vectors reducing the complexity of the standard LDL^(T) algorithm from cubic to quadratic for the factorisation step and from quadratic to linear for the back substitution step, and the storage requirements of said computer system from O(N_(S) ² N²) to O(N_(S) ² N).
 10. Method according to claim 1, wherein the parameters for the optimizing include an admittance matrix based on a branch impedance and a bus fixed shunt admittance, and flow capacity ratings.
 11. Method according to claim 1, where said output parameters comprise complex valued voltages, active and reactive power levels of generators, and energy storage device rate of charge.
 12. Method according to claim 1, where said objective function depends on active power generation variables, reactive power generation variables, complex valued voltages.
 13. Method according to claim 1, wherein the objective function is quadratic.
 14. Method according to claim 1, where the objective function represents market surplus.
 15. Method according to claim 1, where the objective function represents active transmission line losses.
 16. Method according to claim 1, where equality constraints, inequality constraints, and bounds on decision variables are set to model limits of feasible operation of the network.
 17. Method according to claim 1, further comprising modeling bounds on power generation, bounds on voltage magnitude at buses, bounds on rate of charge of batteries, bounds on state-of charge of batteries, and constraints on power transferred on lines.
 18. Method according to claim 1, where the electric power network includes energy storage devices, and the multiple time periods are coupled to accommodate charging and discharging of the power storage devices at any particular time.
 19. Method according to claim 1, where the multiple time periods of operation of the electric network are due to bounds on power generation, bounds on voltage magnitude at buses, bounds on rate of charge of batteries, bounds on state-of-charge of batteries, constraints on the power transferred on the lines and thermal losses.
 20. Method according to claim 1, where the constraint ϵ_(N)=ϵ₀, defined to prevent depletion of the storages at the end of the dispatch horizon of time period T, is defined several times within the dispatch horizon of period T at the end of M subdivisions of duration Δt, (Δt>δt) each. 